import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/home',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue'),
    },
     {
      path: '/Login',
      name: 'Login',
      component: () => import('../views/Userinfor/Login.vue'),
    },
     {
      path: '/Show',
      name: 'Show',
      component: () => import('../views/Userinfor/Show.vue'),
    },
      {
      path: '/AddBody',
      name: 'Add',
      component: () => import('../views/Body/AddBody.vue'),
    },
      {
      path: '/',
      name: 'Showbody',
      component: () => import('../views/Body/Showbody.vue'),
    },
      {
      path: '/Updbody',
      name: 'Updbody',
      component: () => import('../views/Body/Updbody.vue'),
    },
  ], 
})

export default router
